package com.example.wechat.Fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.wechat.R;

public class Fg_fx extends Fragment {
    private TextView mmoments,mvideo,mscan,mshake,mwatch,msearch,mnearby,mshopping,mgame,mApplet;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.activity_fg_fx,container,false);
        mmoments=view.findViewById(R.id.moments);
        mvideo=view.findViewById(R.id.video);
        mscan=view.findViewById(R.id.scan);
        mshake=view.findViewById(R.id.shake);
        mwatch=view.findViewById(R.id.watch);
        msearch=view.findViewById(R.id.search);
        mnearby=view.findViewById(R.id.nearby);
        mshopping=view.findViewById(R.id.shopping);
        mgame=view.findViewById(R.id.game);
        mApplet=view.findViewById(R.id.Applet);
        initView();
        return view;
    }

    private void initView() {
        //朋友圈
        mmoments.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mmoments.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //视频号
        mvideo.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mvideo.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //扫一扫
        mscan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mscan.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //摇一摇
        mshake.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mshake.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //看一看
        mwatch.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mwatch.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //搜一搜
        msearch.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+msearch.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //附近的人
        mnearby.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mnearby.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //购物
        mshopping.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mshopping.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //游戏
        mgame.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mgame.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //小程序
        mApplet.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mApplet.getText(), Toast.LENGTH_SHORT).show();
            }
        });

    }
}
